home *** CD-ROM | disk | FTP | other *** search
/ Maximum CD 2000 September / maximum-cd-2000-09.iso / Vampire the Masquerade / vampire_demo.exe / Codex.nob / ClassSpiderSac.class (.txt) < prev    next >
Encoding:
Java Class File  |  2000-06-22  |  1.4 KB  |  41 lines

  1. public class ClassSpiderSac extends Codex {
  2.    boolean bEnabled;
  3.  
  4.    public void created(int guid) {
  5.       ((Codex)this).SetTimer(3.0F);
  6.    }
  7.  
  8.    public void restore(int flags) {
  9.       this.bEnabled = CodexSequence.RestoreBoolean();
  10.    }
  11.  
  12.    void touched(int guid, int toucherGuid, int captureID) {
  13.       if (this.bEnabled) {
  14.          if (Codex.IsPlayerGuid(toucherGuid)) {
  15.             CodexThing sack = new CodexThing(guid);
  16.             sack.SpawnThing("dust");
  17.             sack.SpawnThing("ghoulSpiderBaby");
  18.             sack.SpawnThing("ghoulSpiderBaby");
  19.             sack.SpawnThing("ghoulSpiderBaby");
  20.             sack.SpawnThing("ghoulSpiderBaby");
  21.             sack.SpawnThing("ghoulSpiderBaby");
  22.             sack.Remove();
  23.             this.bEnabled = false;
  24.          }
  25.  
  26.       }
  27.    }
  28.  
  29.    public void killed(int guid, int causeID, int captureID) {
  30.       this.bEnabled = false;
  31.    }
  32.  
  33.    public void save(int flags) {
  34.       CodexSequence.SaveBoolean(this.bEnabled);
  35.    }
  36.  
  37.    public void timer(int timerID, float arg0, float arg1, float arg2, float arg3) {
  38.       this.bEnabled = true;
  39.    }
  40. }
  41.